<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta http-equiv="pragram" content="no-cache">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>[title]</title>
    <link href="/Public/Home/css/style.css" rel="stylesheet" type="text/css">
    <link href="/Public/Home/css/iconfont.css" rel="stylesheet" type="text/css">
    <script src="/Public/Home/js/jquery-1.11.1.min.js"></script>
    <script src="/Public/Home/js/publicjquery.js"></script>
    <script src="/Public/Home/js/layer/layer.js" ></script>
    <script src="/Public/Home/js/common.js" ></script>
    <script src="/Public/Home/js/ajaxfileupload.js" ></script>
</head>
<body onselectstart="return false">
<div class="main">
    <div class="content">
        <div class="head-content">
            <div class="head-title">短信使用列表(短信剩余量:<?php echo $mess['capacity']-$mess['used'];?>;已使用量:<?php echo ($mess['used']); ?>)</div>
            <div class="head-search">

            </div>
        </div>
    </div>
    <div class="content">
        <div class="head-content">
            <form action="<?php echo U('index');?>" method='get'>
                <div class="head-search">
                    <input class="form-input-small" type="text" value="<?php echo I('get.no');?>" name='no' placeholder="编号" />
                    <input class="form-input-small" type="text" value="<?php echo I('get.phone');?>" name='phone' placeholder="手机号" />
                    <button class="form-button color-bg-green">搜索</button>
                </div>
            </form>
        </div>
    </div>
    <div class="table-list">
        <table cellpadding="0" cellspacing="0">
            <thead>
            <tr>
                <th>快递编号</th>
                <th>收件人电话</th>
                <th>发送时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr >
                    <td><?php echo ($vo['no']); ?></td>
                    <td><?php echo ($vo['phone']); ?></td>
                    <td><?php echo ($vo['create_time']); ?></td>
                    <td>
                        <div class="operate-list">
                            <a class="delete" title='删除' onclick="info(<?php echo ($vo['id']); ?>)" href="javascript:void(0)">
                                <i class="iconfont">&#xe62b;</i>
                            </a>
                        </div>
                    </td>
                </tr><?php endforeach; endif; ?>
        </table>

        <!--没有结果时显示-->
        <?php if(!$list): ?><div class="nodata"><i class="iconfont">&#xe607;</i><span>没有查询到符合条件的记录</span></div><?php endif; ?>

        <!--分页效果-->
        <div class="table-foot">
            <div class="foot-page">
                <ul><?php echo ($page); ?></ul>
            </div>
        </div>

    </div>
</div>

<!--提示框-->
<div class="pop-window pop-delete" id="info">
    <input type="hidden" name="id" id="id"   >
    <div class="pop-notice FromUpToDown">
        <div class="notice-head">
            <div class="notice-head-title">温馨提示</div>
            <div class="notice-head-delete">×</div>
        </div>
        <div class="notice-content">
            <div>
                <i class="iconfont">&#xe607;</i>
            </div>
            <div class="notice-content-word">是否要删除本条信息？</div>
        </div>
        <div class="notice-foot">
            <a href="javascript:;" onclick="del()" class="notice-btn btn-submit">确定</a>
            <a href="javascript:;" class="notice-btn btn-drop">取消</a>
        </div>
    </div>
</div>


<div class="main-foot">Copyright  2013-2015 WeiGouTong.com. All Rights Reserved.  苏ICP备09098830号</div>
<script>
    //弹出询问框
    function info(id){
        $("#id").val(id);
        $("#info").show();
    }

    //删除
    function del(){
        $('#info').hide();
        var id = $("#id").val();
        $.get(
                "<?php echo U('del');?>",
                {
                    id:id
                },
                function(res){
                    if(res.status == false){
                        layer.msg(res.info,{time:1000});
                    }else{
                        layer.msg(res.info,{time:1000});
                        setTimeout("location.reload()",1000);
                    }
                }
        );
    }
</script>
</body>
</html>